package org.apache.database.helper;

import org.apache.database.excpt.ConfigError;
import org.apache.database.execute.BaseSqlExecute;
import org.apache.database.utils.AnnotationUtil;

public  abstract  class BaseHelper {

    private BaseSqlExecute sqlExecute =new BaseSqlExecute();

    public BaseSqlExecute getSqlExecute() {
        return sqlExecute;
    }

    protected String getTabName(Class<?> tClass) {
        String tableName = AnnotationUtil.getTableName(tClass);
        if (tableName == null) {
            throw new ConfigError(tClass + "类上为标记表注解(TabName)");
        }
        return tableName;
    }


}
